Computing devices, such as smartphones, laptops, and tablet computers, are capable of running a variety of applications such as educational, gaming, financial, and utility applications. Increasingly, users are expecting more responsive launch of these applications when requested.
One technique for improving the responsiveness of a computing device to a user's request to launch an application is to place the application in the background of the user space when a user exits the application (instead of killing the application) so that the application may be launched more quickly when requested again by the user.
In many computing devices, however, when available memory becomes low, the device will kill lower priority background applications to free more memory. In an Android-based device, for example, the decision about which application in the background to kill is made by a low-memory killer component, which kills background applications based upon a value (referred to as an oom_adj value) that is assigned to each background application by the Android framework. These oom_adj values are typically between −17 to 15, and the higher the oom_adj value, the more likely that the background application will be selected to be killed by the low-memory killer if the device needs more memory.
In the context of an Android-based device, low oom_adj values (e.g., 0, 1, or 2) are assigned to applications that are visible or are being used by a visible application, but generally, when an application is exited it will be put in the background with an oom_adj value of 7, and as other applications are launched, this oom_adj value is incremented to higher and higher values. So, in practice, the least recently used background application is killed when the device needs memory. This least-recently-used algorithm for freeing up memory may work well in some instances, but in other instances it results in the killing of an application that the user was soon going to launch. As a consequence, the re-launching of the killed application from scratch (instead of from the background) results in a much longer launch latency, which may be an unpleasant experience for the user.